//
//  CEPointInsCell.m
//  digitalCurrency
//
//  Created by 默认账户 on 2019/4/3.
//  Copyright © 2019 XinHuoKeJi. All rights reserved.
//

#import "CEPointInsCell.h"

@interface CEPointInsCell ()



@end

@implementation CEPointInsCell

+ (instancetype)createTableView:(UITableView *)tableView {
    CEPointInsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"setcell"];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.backgroundColor = [UIColor clearColor];

    
    [cell makeViews];
    
    return cell;
}

- (void)makeViews {
    CGFloat viewwidth = SCREEN_WIDTH-48;
    
    if (self.firstL) {
        return;
    }
    for (int i = 0; i < 3; i++) {
        UILabel *firstL = [[UILabel alloc] init];
        firstL.textColor = tThreeColor;
        firstL.font = [UIFont systemFontOfSize:16];
        [self addSubview:firstL];
        if (i == 0) {
            self.firstL = firstL;
        }
        else if (i == 1) {
            self.secondL = firstL;
            firstL.textAlignment = NSTextAlignmentCenter;
        }
        else {
            self.thirdL = firstL;
            firstL.textAlignment = NSTextAlignmentRight;
        }
        
        [firstL mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(0);
            make.left.mas_equalTo(24 + (i*viewwidth/3.0));
            make.height.mas_equalTo(49);
            make.width.mas_equalTo(viewwidth/3.0);
        }];
    }
}

- (void)setContents:(NSArray *)contents {
    self.firstL.text = contents[0];
    self.secondL.text = contents[1];
    self.thirdL.text = contents[2];
}

@end
